class Admin::HourBanksController < AdminController

  before_filter :load_user

  private

  def collection
    @hour_banks ||= @user.hour_banks.all(:select => "id, float2hour(hours) AS amount, date, user_id")
  end

  def object
    @hour_bank ||= HourBank.find(params[:id])
  end

  def load_user
    @user ||= User.find(params[:user_id])
  end

  def model_name
    'hour_bank'
  end

end
